package cn.com.wangluotongxin.admin.model.constants;

public enum MessageBusinessType {
    // 业务类型 1.数据库发版
    DATABASE(1, "数据库发版", "数据库发版");

    private Integer code;
    public Integer getCode(){
        return this.code;
    }

    private String name;
    public String getName(){
        return this.name;
    }

    private String title;
    public String getTitle() {
        return title;
    }

    public static MessageBusinessType getByCode(Integer code){
        if(code == null){
            return null;
        }else {
            MessageBusinessType[] messageBusinessTypes = values();
            for(MessageBusinessType messageBusinessType : messageBusinessTypes){
                if(messageBusinessType.getCode().equals(code)){
                    return messageBusinessType;
                }
            }
        }
        return null;
    }

    MessageBusinessType(Integer code, String name, String title){
        this.code = code;
        this.name = name;
        this.title = title;
    }
}
